<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: FIFO buffer control Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__sar__functions__fifo.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">FIFO buffer control Functions<div class="ingroups"><a class="el" href="group__group__sar.html">SAR          (SAR ADC Subsystem)</a> &raquo; <a class="el" href="group__group__sar__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7f5f7e45747d0ae735cd2c0b89443b44"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__fifo.html#ga7f5f7e45747d0ae735cd2c0b89443b44">Cy_SAR_FifoRead</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base, <a class="el" href="structcy__stc__sar__fifo__read__t.html">cy_stc_sar_fifo_read_t</a> *readStruct)</td></tr>
<tr class="memdesc:ga7f5f7e45747d0ae735cd2c0b89443b44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads FIFO word-by-word.  <a href="#ga7f5f7e45747d0ae735cd2c0b89443b44">More...</a><br /></td></tr>
<tr class="separator:ga7f5f7e45747d0ae735cd2c0b89443b44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gace1e90631a3deb93a68c6e835e3b5f2b"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__fifo.html#gace1e90631a3deb93a68c6e835e3b5f2b">Cy_SAR_FifoGetDataCount</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base)</td></tr>
<tr class="memdesc:gace1e90631a3deb93a68c6e835e3b5f2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a number of non-empty FIFO cells.  <a href="#gace1e90631a3deb93a68c6e835e3b5f2b">More...</a><br /></td></tr>
<tr class="separator:gace1e90631a3deb93a68c6e835e3b5f2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga45de5a052c6ba7eeb021bab952e96ecf"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__fifo.html#ga45de5a052c6ba7eeb021bab952e96ecf">Cy_SAR_FifoSetLevel</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base, uint32_t level)</td></tr>
<tr class="memdesc:ga45de5a052c6ba7eeb021bab952e96ecf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the FIFO trigger level which specifies how many samples FIFO should contain in order to generate trigger event.  <a href="#ga45de5a052c6ba7eeb021bab952e96ecf">More...</a><br /></td></tr>
<tr class="separator:ga45de5a052c6ba7eeb021bab952e96ecf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3996c75d7dc3b2e2e562dbd720e1f8f0"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__fifo.html#ga3996c75d7dc3b2e2e562dbd720e1f8f0">Cy_SAR_ClearFifoInterrupt</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base, uint32_t intrMask)</td></tr>
<tr class="memdesc:ga3996c75d7dc3b2e2e562dbd720e1f8f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the FIFO interrupt.  <a href="#ga3996c75d7dc3b2e2e562dbd720e1f8f0">More...</a><br /></td></tr>
<tr class="separator:ga3996c75d7dc3b2e2e562dbd720e1f8f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga691e4c18793cd0d22e4a349bce129153"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__fifo.html#ga691e4c18793cd0d22e4a349bce129153">Cy_SAR_SetFifoInterrupt</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base, uint32_t intrMask)</td></tr>
<tr class="memdesc:ga691e4c18793cd0d22e4a349bce129153"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trigger an interrupt with software.  <a href="#ga691e4c18793cd0d22e4a349bce129153">More...</a><br /></td></tr>
<tr class="separator:ga691e4c18793cd0d22e4a349bce129153"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaad3ec31442271f30246bf1c3fef101df"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__fifo.html#gaad3ec31442271f30246bf1c3fef101df">Cy_SAR_SetFifoInterruptMask</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base, uint32_t intrMask)</td></tr>
<tr class="memdesc:gaad3ec31442271f30246bf1c3fef101df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable which interrupts can trigger the CPU interrupt controller.  <a href="#gaad3ec31442271f30246bf1c3fef101df">More...</a><br /></td></tr>
<tr class="separator:gaad3ec31442271f30246bf1c3fef101df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaed2673c0d9b0b936fd37de93650f0b13"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__fifo.html#gaed2673c0d9b0b936fd37de93650f0b13">Cy_SAR_GetFifoInterruptStatus</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base)</td></tr>
<tr class="memdesc:gaed2673c0d9b0b936fd37de93650f0b13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the interrupt register status.  <a href="#gaed2673c0d9b0b936fd37de93650f0b13">More...</a><br /></td></tr>
<tr class="separator:gaed2673c0d9b0b936fd37de93650f0b13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9bdfc1be5f5fdbe32d1c4093b1f00a9d"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__fifo.html#ga9bdfc1be5f5fdbe32d1c4093b1f00a9d">Cy_SAR_GetFifoInterruptMask</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base)</td></tr>
<tr class="memdesc:ga9bdfc1be5f5fdbe32d1c4093b1f00a9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return which interrupts can trigger the CPU interrupt controller as configured by <a class="el" href="group__group__sar__functions__fifo.html#gaad3ec31442271f30246bf1c3fef101df">Cy_SAR_SetFifoInterruptMask</a>.  <a href="#ga9bdfc1be5f5fdbe32d1c4093b1f00a9d">More...</a><br /></td></tr>
<tr class="separator:ga9bdfc1be5f5fdbe32d1c4093b1f00a9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga71a38a378438a81d1097a116a42608b1"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__fifo.html#ga71a38a378438a81d1097a116a42608b1">Cy_SAR_GetFifoInterruptStatusMasked</a> (const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *base)</td></tr>
<tr class="memdesc:ga71a38a378438a81d1097a116a42608b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the bitwise AND between the interrupt request and mask registers.  <a href="#ga71a38a378438a81d1097a116a42608b1">More...</a><br /></td></tr>
<tr class="separator:ga71a38a378438a81d1097a116a42608b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7f5f7e45747d0ae735cd2c0b89443b44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7f5f7e45747d0ae735cd2c0b89443b44">&#9670;&nbsp;</a></span>Cy_SAR_FifoRead()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_SAR_FifoRead </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__sar__fifo__read__t.html">cy_stc_sar_fifo_read_t</a> *&#160;</td>
          <td class="paramname"><em>readStruct</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads FIFO word-by-word. </p>
<dl class="section return"><dt>Returns</dt><dd>Subsequent data sample</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Collect channel data from the FIFO */</span></div><div class="line"><span class="preprocessor">    #define FIFO_DEPTH (64UL)</span></div><div class="line"><span class="preprocessor">    #define CHAN_NUM   (16UL)</span></div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__sar__fifo__config__t.html">cy_stc_sar_fifo_config_t</a> fifoConfig =</div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__sar__fifo__config__t.html#a2e7fe00d88c7e05d766116b7f1154c8c">chanId</a> = <span class="keyword">true</span>, <span class="comment">/* fifoRead.channel will contain channel number */</span></div><div class="line">        .chainToNext = <span class="keyword">false</span>, <span class="comment">/* No FIFO chaining */</span></div><div class="line">        .clrTrIntrOnRead = <span class="keyword">false</span>, <span class="comment">/* Interrupt is cleared by interrupt handler */</span></div><div class="line">        .level = FIFO_DEPTH, <span class="comment">/* FIFO depth is 64 if no chaining */</span></div><div class="line">        .trOut = <span class="keyword">false</span> <span class="comment">/* Interrupt is used to get fifo data */</span></div><div class="line">    };</div><div class="line">    </div><div class="line">    config.<a class="code" href="structcy__stc__sar__config__t.html#a55439d6fb0318718344ef9a13f622987">fifoCfgPtr</a> = &amp;fifoConfig;</div><div class="line">    (void) <a class="code" href="group__group__sar__functions__basic.html#ga5c053a77ca29519ca29da56da7eaeebe">Cy_SAR_Init</a>(SAR_HW, &amp;config); <span class="comment">/* Initialize SAR with FIFO */</span></div><div class="line">    <a class="code" href="group__group__sar__functions__basic.html#ga4b8bb939483fac5768910156075d4264">Cy_SAR_Enable</a>(SAR_HW); <span class="comment">/* FIFO is enabled with SAR if fifoCfgPtr is not NULL */</span></div><div class="line">    </div><div class="line">    <span class="comment">/* Then, for example in the interrupt handler: */</span></div><div class="line">    uint16_t sarResults[CHAN_NUM][FIFO_DEPTH];</div><div class="line">    <a class="code" href="structcy__stc__sar__fifo__read__t.html">cy_stc_sar_fifo_read_t</a> fifoRead;</div><div class="line">    uint32_t numSamples = <a class="code" href="group__group__sar__functions__fifo.html#gace1e90631a3deb93a68c6e835e3b5f2b">Cy_SAR_FifoGetDataCount</a>(SAR_HW);</div><div class="line"></div><div class="line">    <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; numSamples; i++)</div><div class="line">    {</div><div class="line">        <a class="code" href="group__group__sar__functions__fifo.html#ga7f5f7e45747d0ae735cd2c0b89443b44">Cy_SAR_FifoRead</a>(SAR_HW, &amp;fifoRead);</div><div class="line">        sarResults[fifoRead.<a class="code" href="structcy__stc__sar__fifo__read__t.html#a22fbd646c236ab6d253eea88dc5b5e4e">channel</a>][i] = fifoRead.<a class="code" href="structcy__stc__sar__fifo__read__t.html#a6f977a6fda497938f602dbfe89c1c5e5">value</a>;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">/* Scenario: FIFO is no more needed - reinitialize SAR without FIFO */</span></div><div class="line">    <a class="code" href="group__group__sar__functions__basic.html#ga09f2185e586c580e622a252580793a25">Cy_SAR_Disable</a>(SAR_HW); <span class="comment">/* FIFO is disabled with SAR */</span></div><div class="line">    config.<a class="code" href="structcy__stc__sar__config__t.html#a55439d6fb0318718344ef9a13f622987">fifoCfgPtr</a> = NULL;</div><div class="line">    (void) <a class="code" href="group__group__sar__functions__basic.html#ga5c053a77ca29519ca29da56da7eaeebe">Cy_SAR_Init</a>(SAR_HW, &amp;config);</div><div class="line">    <a class="code" href="group__group__sar__functions__basic.html#ga4b8bb939483fac5768910156075d4264">Cy_SAR_Enable</a>(SAR_HW); <span class="comment">/* Now FIFO is not enabled with SAR if fifoCfgPtr = NULL */</span></div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="gace1e90631a3deb93a68c6e835e3b5f2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gace1e90631a3deb93a68c6e835e3b5f2b">&#9670;&nbsp;</a></span>Cy_SAR_FifoGetDataCount()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_SAR_FifoGetDataCount </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a number of non-empty FIFO cells. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of FIFO samples.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    <span class="comment">/* Scenario: Collect channel data from the FIFO */</span></div><div class="line"><span class="preprocessor">    #define FIFO_DEPTH (64UL)</span></div><div class="line"><span class="preprocessor">    #define CHAN_NUM   (16UL)</span></div><div class="line">    </div><div class="line">    <a class="code" href="structcy__stc__sar__fifo__config__t.html">cy_stc_sar_fifo_config_t</a> fifoConfig =</div><div class="line">    {</div><div class="line">        .<a class="code" href="structcy__stc__sar__fifo__config__t.html#a2e7fe00d88c7e05d766116b7f1154c8c">chanId</a> = <span class="keyword">true</span>, <span class="comment">/* fifoRead.channel will contain channel number */</span></div><div class="line">        .chainToNext = <span class="keyword">false</span>, <span class="comment">/* No FIFO chaining */</span></div><div class="line">        .clrTrIntrOnRead = <span class="keyword">false</span>, <span class="comment">/* Interrupt is cleared by interrupt handler */</span></div><div class="line">        .level = FIFO_DEPTH, <span class="comment">/* FIFO depth is 64 if no chaining */</span></div><div class="line">        .trOut = <span class="keyword">false</span> <span class="comment">/* Interrupt is used to get fifo data */</span></div><div class="line">    };</div><div class="line">    </div><div class="line">    config.<a class="code" href="structcy__stc__sar__config__t.html#a55439d6fb0318718344ef9a13f622987">fifoCfgPtr</a> = &amp;fifoConfig;</div><div class="line">    (void) <a class="code" href="group__group__sar__functions__basic.html#ga5c053a77ca29519ca29da56da7eaeebe">Cy_SAR_Init</a>(SAR_HW, &amp;config); <span class="comment">/* Initialize SAR with FIFO */</span></div><div class="line">    <a class="code" href="group__group__sar__functions__basic.html#ga4b8bb939483fac5768910156075d4264">Cy_SAR_Enable</a>(SAR_HW); <span class="comment">/* FIFO is enabled with SAR if fifoCfgPtr is not NULL */</span></div><div class="line">    </div><div class="line">    <span class="comment">/* Then, for example in the interrupt handler: */</span></div><div class="line">    uint16_t sarResults[CHAN_NUM][FIFO_DEPTH];</div><div class="line">    <a class="code" href="structcy__stc__sar__fifo__read__t.html">cy_stc_sar_fifo_read_t</a> fifoRead;</div><div class="line">    uint32_t numSamples = <a class="code" href="group__group__sar__functions__fifo.html#gace1e90631a3deb93a68c6e835e3b5f2b">Cy_SAR_FifoGetDataCount</a>(SAR_HW);</div><div class="line"></div><div class="line">    <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; numSamples; i++)</div><div class="line">    {</div><div class="line">        <a class="code" href="group__group__sar__functions__fifo.html#ga7f5f7e45747d0ae735cd2c0b89443b44">Cy_SAR_FifoRead</a>(SAR_HW, &amp;fifoRead);</div><div class="line">        sarResults[fifoRead.<a class="code" href="structcy__stc__sar__fifo__read__t.html#a22fbd646c236ab6d253eea88dc5b5e4e">channel</a>][i] = fifoRead.<a class="code" href="structcy__stc__sar__fifo__read__t.html#a6f977a6fda497938f602dbfe89c1c5e5">value</a>;</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">/* Scenario: FIFO is no more needed - reinitialize SAR without FIFO */</span></div><div class="line">    <a class="code" href="group__group__sar__functions__basic.html#ga09f2185e586c580e622a252580793a25">Cy_SAR_Disable</a>(SAR_HW); <span class="comment">/* FIFO is disabled with SAR */</span></div><div class="line">    config.<a class="code" href="structcy__stc__sar__config__t.html#a55439d6fb0318718344ef9a13f622987">fifoCfgPtr</a> = NULL;</div><div class="line">    (void) <a class="code" href="group__group__sar__functions__basic.html#ga5c053a77ca29519ca29da56da7eaeebe">Cy_SAR_Init</a>(SAR_HW, &amp;config);</div><div class="line">    <a class="code" href="group__group__sar__functions__basic.html#ga4b8bb939483fac5768910156075d4264">Cy_SAR_Enable</a>(SAR_HW); <span class="comment">/* Now FIFO is not enabled with SAR if fifoCfgPtr = NULL */</span></div><div class="line">    </div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga45de5a052c6ba7eeb021bab952e96ecf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga45de5a052c6ba7eeb021bab952e96ecf">&#9670;&nbsp;</a></span>Cy_SAR_FifoSetLevel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_SAR_FifoSetLevel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>level</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the FIFO trigger level which specifies how many samples FIFO should contain in order to generate trigger event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">level</td><td>The FIFO trigger level to be set. Range: 1..256.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="ga3996c75d7dc3b2e2e562dbd720e1f8f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3996c75d7dc3b2e2e562dbd720e1f8f0">&#9670;&nbsp;</a></span>Cy_SAR_ClearFifoInterrupt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_SAR_ClearFifoInterrupt </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>intrMask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear the FIFO interrupt. </p>
<p>The interrupt must be cleared with this function so that the hardware can set subsequent interrupts and those interrupts can be forwarded to the interrupt controller, if enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">intrMask</td><td>The mask of interrupts to clear. Typically this will be the value returned from <a class="el" href="group__group__sar__functions__fifo.html#gaed2673c0d9b0b936fd37de93650f0b13">Cy_SAR_GetFifoInterruptStatus</a>. Alternately, select one or more values from <a class="el" href="group__group__sar__macros__interrupt.html">Interrupt Masks</a> and "OR" them together.<ul>
<li><a class="el" href="group__group__sar__macros__interrupt.html#ga4631d21a955c1b3153c68f14d124f3d9">CY_SAR_INTR_FIFO_LEVEL</a></li>
<li><a class="el" href="group__group__sar__macros__interrupt.html#ga00e87ae8adaeda977189f9e56b47d1fa">CY_SAR_INTR_FIFO_OVERFLOW</a></li>
<li><a class="el" href="group__group__sar__macros__interrupt.html#ga7082c07883675f86f026260c7a9c8cb3">CY_SAR_INTR_FIFO_UNDERFLOW</a></li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="ga691e4c18793cd0d22e4a349bce129153"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga691e4c18793cd0d22e4a349bce129153">&#9670;&nbsp;</a></span>Cy_SAR_SetFifoInterrupt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_SAR_SetFifoInterrupt </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>intrMask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Trigger an interrupt with software. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">intrMask</td><td>The mask of interrupts to set. Select one or more values from <a class="el" href="group__group__sar__macros__interrupt.html">Interrupt Masks</a> and "OR" them together.<ul>
<li><a class="el" href="group__group__sar__macros__interrupt.html#ga4631d21a955c1b3153c68f14d124f3d9">CY_SAR_INTR_FIFO_LEVEL</a></li>
<li><a class="el" href="group__group__sar__macros__interrupt.html#ga00e87ae8adaeda977189f9e56b47d1fa">CY_SAR_INTR_FIFO_OVERFLOW</a></li>
<li><a class="el" href="group__group__sar__macros__interrupt.html#ga7082c07883675f86f026260c7a9c8cb3">CY_SAR_INTR_FIFO_UNDERFLOW</a></li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="gaad3ec31442271f30246bf1c3fef101df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaad3ec31442271f30246bf1c3fef101df">&#9670;&nbsp;</a></span>Cy_SAR_SetFifoInterruptMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_SAR_SetFifoInterruptMask </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>intrMask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable which interrupts can trigger the CPU interrupt controller. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">intrMask</td><td>The mask of interrupts. Select one or more values from <a class="el" href="group__group__sar__macros__interrupt.html">Interrupt Masks</a> and "OR" them together:<ul>
<li><a class="el" href="group__group__sar__macros__interrupt.html#ga4631d21a955c1b3153c68f14d124f3d9">CY_SAR_INTR_FIFO_LEVEL</a></li>
<li><a class="el" href="group__group__sar__macros__interrupt.html#ga00e87ae8adaeda977189f9e56b47d1fa">CY_SAR_INTR_FIFO_OVERFLOW</a></li>
<li><a class="el" href="group__group__sar__macros__interrupt.html#ga7082c07883675f86f026260c7a9c8cb3">CY_SAR_INTR_FIFO_UNDERFLOW</a></li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="gaed2673c0d9b0b936fd37de93650f0b13"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaed2673c0d9b0b936fd37de93650f0b13">&#9670;&nbsp;</a></span>Cy_SAR_GetFifoInterruptStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_SAR_GetFifoInterruptStatus </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the interrupt register status. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Interrupt status <a class="el" href="group__group__sar__macros__interrupt.html">Interrupt Masks</a>. </dd></dl>

</div>
</div>
<a id="ga9bdfc1be5f5fdbe32d1c4093b1f00a9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9bdfc1be5f5fdbe32d1c4093b1f00a9d">&#9670;&nbsp;</a></span>Cy_SAR_GetFifoInterruptMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_SAR_GetFifoInterruptMask </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return which interrupts can trigger the CPU interrupt controller as configured by <a class="el" href="group__group__sar__functions__fifo.html#gaad3ec31442271f30246bf1c3fef101df">Cy_SAR_SetFifoInterruptMask</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Interrupt mask. Compare this value with masks in <a class="el" href="group__group__sar__macros__interrupt.html">Interrupt Masks</a>. </dd></dl>

</div>
</div>
<a id="ga71a38a378438a81d1097a116a42608b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga71a38a378438a81d1097a116a42608b1">&#9670;&nbsp;</a></span>Cy_SAR_GetFifoInterruptStatusMasked()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_SAR_GetFifoInterruptStatusMasked </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_s_a_r___type.html">SAR_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the bitwise AND between the interrupt request and mask registers. </p>
<p>See <a class="el" href="group__group__sar__functions__fifo.html#gaed2673c0d9b0b936fd37de93650f0b13">Cy_SAR_GetFifoInterruptStatus</a> and <a class="el" href="group__group__sar__functions__fifo.html#ga9bdfc1be5f5fdbe32d1c4093b1f00a9d">Cy_SAR_GetFifoInterruptMask</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Bitwise AND of the interrupt request and mask registers <a class="el" href="group__group__sar__macros__interrupt.html">Interrupt Masks</a>. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
